import { Component } from '@angular/core';
import { FORM } from './form';
@Component({
  selector: 'app-kitchen',
  templateUrl: './kitchen.component.html',
  styleUrls: ['./kitchen.component.scss']
})
export class KitchenComponent {
  public form: any = FORM;
  public options: any = {
    hooks: {
      beforeSubmit: (submission: object, cb: any) => {
        console.log('Before Submit');
        console.log(submission);
        setTimeout(() => cb(null, submission), 1000);
      }
    }
  };
  /* tslint:disable:max-line-length */
  public submission: any = {
    data: {
      user: {
        firstName: 'Joe',
        lastName: 'Smith',
        email: 'joe@example.com',
        kids: [
          'Susie',
          'Jack'
        ]
      },
      cars: [
        {
          make: 'Jeep',
          model: 'Wrangler',
          year: '2010'
        },
        {
          make: 'Ford',
          model: 'Mustang',
          year: '2014'
        }
      ],
      signature: ''
    }
  };
  /* tslint:enable:max-line-length */

  onRender() {
    console.log('onRender');
  }
  onSubmit(value: any) {
    console.log('onSubmit');
    console.log(value);
  }
  onChange(value: any) {
    console.log('onChange');
    console.log(value);
  }
}
